package com.bbc.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.kingja.loadsir.callback.Callback;
import com.kingja.loadsir.core.LoadService;
import com.kingja.loadsir.core.LoadSir;

import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/9/26.
 */

public abstract class BaseActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
       /* LoadSir loadSir = new LoadSir.Builder()
                .addCallback(new TimeoutCallback())
                .setDefaultCallback(LoadingCallback.class)
                .build();*/
        LoadService loadService = LoadSir.getDefault().register(this, new Callback.OnReloadListener() {
            @Override
            public void onReload(View v) {
                // 重新加载逻辑
            }
        });
        findViewId();
        initData();
        setListeners();
    }

    protected abstract void setListeners();

    protected abstract void initData();

    protected abstract void findViewId();

}
